﻿using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;

namespace Alfa.Math {
	//[Serializable]
	//[TypeConverter(typeof(VectorConverter))]
	/*internal interface IVector : IEquatable<IVector> {
		/// <summary>
		/// Gets or sets the x-component of the vector.
		/// </summary>
		[SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
		public float X;

		/// <summary>
		/// Gets or sets the y-component of the vector.
		/// </summary>
		[SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
		public float Y;

		//
		// Summary:
		//     Gets or sets the z-component of the vector.
		[SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
		public float Z;

		//
		// Summary:
		//     Creates a new instance of Vector.
		//
		// Parameters:
		//   value:
		//     Value to initialize each component to.
		//public Vector(float value);
		//
		// Summary:
		//     Initializes a new instance of Vector.
		//
		// Parameters:
		//   value:
		//     A vector containing the values to initialize x and y components with.
		//
		//   z:
		//     Initial value for the z-component of the vector.
		//public Vector(Vector2 value, float z);
		//
		// Summary:
		//     Initializes a new instance of Vector.
		//
		// Parameters:
		//   x:
		//     Initial value for the x-component of the vector.
		//
		//   y:
		//     Initial value for the y-component of the vector.
		//
		//   z:
		//     Initial value for the z-component of the vector.
		//public Vector(float x, float y, float z);


		//
		// Summary:
		//     Returns a Vector containing the 3D Cartesian coordinates of a point specified
		//     in Barycentric coordinates relative to a 3D triangle.
		//
		// Parameters:
		//   value1:
		//     A Vector containing the 3D Cartesian coordinates of vertex 1 of the triangle.
		//
		//   value2:
		//     A Vector containing the 3D Cartesian coordinates of vertex 2 of the triangle.
		//
		//   value3:
		//     A Vector containing the 3D Cartesian coordinates of vertex 3 of the triangle.
		//
		//   amount1:
		//     Barycentric coordinate b2, which expresses the weighting factor toward vertex
		//     2 (specified in value2).
		//
		//   amount2:
		//     Barycentric coordinate b3, which expresses the weighting factor toward vertex
		//     3 (specified in value3).
		public static Vector Barycentric(Vector value1, Vector value2, Vector value3, float amount1, float amount2);
		//
		// Summary:
		//     Returns a Vector containing the 3D Cartesian coordinates of a point specified
		//     in barycentric (areal) coordinates relative to a 3D triangle.
		//
		// Parameters:
		//   value1:
		//     A Vector containing the 3D Cartesian coordinates of vertex 1 of the triangle.
		//
		//   value2:
		//     A Vector containing the 3D Cartesian coordinates of vertex 2 of the triangle.
		//
		//   value3:
		//     A Vector containing the 3D Cartesian coordinates of vertex 3 of the triangle.
		//
		//   amount1:
		//     Barycentric coordinate b2, which expresses the weighting factor toward vertex
		//     2 (specified in value2).
		//
		//   amount2:
		//     Barycentric coordinate b3, which expresses the weighting factor toward vertex
		//     3 (specified in value3).
		//
		//   result:
		//     [OutAttribute] The 3D Cartesian coordinates of the specified point are placed
		//     in this Vector on exit.
		public static void Barycentric(ref Vector value1, ref Vector value2, ref Vector value3, float amount1, float amount2, out Vector result);
		//
		// Summary:
		//     Performs a Catmull-Rom interpolation using the specified positions.
		//
		// Parameters:
		//   value1:
		//     The first position in the interpolation.
		//
		//   value2:
		//     The second position in the interpolation.
		//
		//   value3:
		//     The third position in the interpolation.
		//
		//   value4:
		//     The fourth position in the interpolation.
		//
		//   amount:
		//     Weighting factor.
		public static Vector CatmullRom(Vector value1, Vector value2, Vector value3, Vector value4, float amount);
		//
		// Summary:
		//     Performs a Catmull-Rom interpolation using the specified positions.
		//
		// Parameters:
		//   value1:
		//     The first position in the interpolation.
		//
		//   value2:
		//     The second position in the interpolation.
		//
		//   value3:
		//     The third position in the interpolation.
		//
		//   value4:
		//     The fourth position in the interpolation.
		//
		//   amount:
		//     Weighting factor.
		//
		//   result:
		//     [OutAttribute] A vector that is the result of the Catmull-Rom interpolation.
		public static void CatmullRom(ref Vector value1, ref Vector value2, ref Vector value3, ref Vector value4, float amount, out Vector result);
		//
		// Summary:
		//     Restricts a value to be within a specified range.
		//
		// Parameters:
		//   value1:
		//     The value to clamp.
		//
		//   min:
		//     The minimum value.
		//
		//   max:
		//     The maximum value.
		public static Vector Clamp(Vector value1, Vector min, Vector max);
		//
		// Summary:
		//     Restricts a value to be within a specified range.
		//
		// Parameters:
		//   value1:
		//     The value to clamp.
		//
		//   min:
		//     The minimum value.
		//
		//   max:
		//     The maximum value.
		//
		//   result:
		//     [OutAttribute] The clamped value.
		public static void Clamp(ref Vector value1, ref Vector min, ref Vector max, out Vector result);
		//
		// Summary:
		//     Calculates the cross product of two vectors.
		//
		// Parameters:
		//   vector1:
		//     Source vector.
		//
		//   vector2:
		//     Source vector.
		public static Vector Cross(Vector vector1, Vector vector2);
		//
		// Summary:
		//     Calculates the cross product of two vectors.
		//
		// Parameters:
		//   vector1:
		//     Source vector.
		//
		//   vector2:
		//     Source vector.
		//
		//   result:
		//     [OutAttribute] The cross product of the vectors.
		public static void Cross(ref Vector vector1, ref Vector vector2, out Vector result);
		//
		// Summary:
		//     Calculates the distance between two vectors.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		public static float Distance(Vector value1, Vector value2);
		//
		// Summary:
		//     Calculates the distance between two vectors.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		//
		//   result:
		//     [OutAttribute] The distance between the vectors.
		public static void Distance(ref Vector value1, ref Vector value2, out float result);
		//
		// Summary:
		//     Calculates the distance between two vectors squared.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		public static float DistanceSquared(Vector value1, Vector value2);
		//
		// Summary:
		//     Calculates the distance between two vectors squared.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		//
		//   result:
		//     [OutAttribute] The distance between the two vectors squared.
		public static void DistanceSquared(ref Vector value1, ref Vector value2, out float result);
		//
		// Summary:
		//     Calculates the dot product of two vectors. If the two vectors are unit vectors,
		//     the dot product returns a floating point value between -1 and 1 that can
		//     be used to determine some properties of the angle between two vectors. For
		//     example, it can show whether the vectors are orthogonal, parallel, or have
		//     an acute or obtuse angle between them.
		//
		// Parameters:
		//   vector1:
		//     Source vector.
		//
		//   vector2:
		//     Source vector.
		public static float Dot(Vector vector1, Vector vector2);
		//
		// Summary:
		//     Calculates the dot product of two vectors and writes the result to a user-specified
		//     variable. If the two vectors are unit vectors, the dot product returns a
		//     floating point value between -1 and 1 that can be used to determine some
		//     properties of the angle between two vectors. For example, it can show whether
		//     the vectors are orthogonal, parallel, or have an acute or obtuse angle between
		//     them.
		//
		// Parameters:
		//   vector1:
		//     Source vector.
		//
		//   vector2:
		//     Source vector.
		//
		//   result:
		//     [OutAttribute] The dot product of the two vectors.
		public static void Dot(ref Vector vector1, ref Vector vector2, out float result);
		//
		// Summary:
		//     Returns a value that indicates whether the current instance is equal to a
		//     specified object.
		//
		// Parameters:
		//   obj:
		//     Object to make the comparison with.
		public override bool Equals(object obj);
		//
		// Summary:
		//     Gets the hash code of the vector object.
		public override int GetHashCode( );
		//
		// Summary:
		//     Performs a Hermite spline interpolation.
		//
		// Parameters:
		//   value1:
		//     Source position vector.
		//
		//   tangent1:
		//     Source tangent vector.
		//
		//   value2:
		//     Source position vector.
		//
		//   tangent2:
		//     Source tangent vector.
		//
		//   amount:
		//     Weighting factor.
		public static Vector Hermite(Vector value1, Vector tangent1, Vector value2, Vector tangent2, float amount);
		//
		// Summary:
		//     Performs a Hermite spline interpolation.
		//
		// Parameters:
		//   value1:
		//     Source position vector.
		//
		//   tangent1:
		//     Source tangent vector.
		//
		//   value2:
		//     Source position vector.
		//
		//   tangent2:
		//     Source tangent vector.
		//
		//   amount:
		//     Weighting factor.
		//
		//   result:
		//     [OutAttribute] The result of the Hermite spline interpolation.
		public static void Hermite(ref Vector value1, ref Vector tangent1, ref Vector value2, ref Vector tangent2, float amount, out Vector result);
		//
		// Summary:
		//     Calculates the length of the vector.
		public float Length( );
		//
		// Summary:
		//     Calculates the length of the vector squared.
		public float LengthSquared( );
		//
		// Summary:
		//     Performs a linear interpolation between two vectors.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		//
		//   amount:
		//     Value between 0 and 1 indicating the weight of value2.
		public static Vector Lerp(Vector value1, Vector value2, float amount);
		//
		// Summary:
		//     Performs a linear interpolation between two vectors.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		//
		//   amount:
		//     Value between 0 and 1 indicating the weight of value2.
		//
		//   result:
		//     [OutAttribute] The result of the interpolation.
		public static void Lerp(ref Vector value1, ref Vector value2, float amount, out Vector result);
		//
		// Summary:
		//     Returns a vector that contains the highest value from each matching pair
		//     of components.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		public static Vector Max(Vector value1, Vector value2);
		//
		// Summary:
		//     Returns a vector that contains the highest value from each matching pair
		//     of components.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		//
		//   result:
		//     [OutAttribute] The maximized vector.
		public static void Max(ref Vector value1, ref Vector value2, out Vector result);
		//
		// Summary:
		//     Returns a vector that contains the lowest value from each matching pair of
		//     components.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		public static Vector Min(Vector value1, Vector value2);
		//
		// Summary:
		//     Returns a vector that contains the lowest value from each matching pair of
		//     components.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		//
		//   result:
		//     [OutAttribute] The minimized vector.
		public static void Min(ref Vector value1, ref Vector value2, out Vector result);
		//
		// Summary:
		//     Turns the current vector into a unit vector. The result is a vector one unit
		//     in length pointing in the same direction as the original vector.
		public void Normalize( );
		//
		// Summary:
		//     Creates a unit vector from the specified vector. The result is a vector one
		//     unit in length pointing in the same direction as the original vector.
		//
		// Parameters:
		//   value:
		//     The source Vector.
		public static Vector Normalize(Vector value);
		//
		// Summary:
		//     Creates a unit vector from the specified vector, writing the result to a
		//     user-specified variable. The result is a vector one unit in length pointing
		//     in the same direction as the original vector.
		//
		// Parameters:
		//   value:
		//     Source vector.
		//
		//   result:
		//     [OutAttribute] The normalized vector.
		public static void Normalize(ref Vector value, out Vector result);
		//
		// Summary:
		//     Returns the reflection of a vector off a surface that has the specified normal.
		//     Reference page contains code sample.
		//
		// Parameters:
		//   vector:
		//     Source vector.
		//
		//   normal:
		//     Normal of the surface.
		public static Vector Reflect(Vector vector, Vector normal);
		//
		// Summary:
		//     Returns the reflection of a vector off a surface that has the specified normal.
		//     Reference page contains code sample.
		//
		// Parameters:
		//   vector:
		//     Source vector.
		//
		//   normal:
		//     Normal of the surface.
		//
		//   result:
		//     [OutAttribute] The reflected vector.
		public static void Reflect(ref Vector vector, ref Vector normal, out Vector result);
		//
		// Summary:
		//     Interpolates between two values using a cubic equation.
		//
		// Parameters:
		//   value1:
		//     Source value.
		//
		//   value2:
		//     Source value.
		//
		//   amount:
		//     Weighting value.
		public static Vector SmoothStep(Vector value1, Vector value2, float amount);
		//
		// Summary:
		//     Interpolates between two values using a cubic equation.
		//
		// Parameters:
		//   value1:
		//     Source vector.
		//
		//   value2:
		//     Source vector.
		//
		//   amount:
		//     Weighting value.
		//
		//   result:
		//     [OutAttribute] The interpolated value.
		public static void SmoothStep(ref Vector value1, ref Vector value2, float amount, out Vector result);
		//
		// Summary:
		//     Retrieves a string representation of the current object.
		public override string ToString( );
		//
		// Summary:
		//     Transforms a 3D vector by the given matrix.
		//
		// Parameters:
		//   position:
		//     The source vector.
		//
		//   matrix:
		//     The transformation matrix.
		public static Vector Transform(Vector position, Matrix matrix);
		//
		// Summary:
		//     Transforms a Vector by a specified Quaternion rotation.
		//
		// Parameters:
		//   value:
		//     The Vector to rotate.
		//
		//   rotation:
		//     The Quaternion rotation to apply.
		public static Vector Transform(Vector value, Quaternion rotation);
		//
		// Summary:
		//     Transforms a Vector by the given Matrix.
		//
		// Parameters:
		//   position:
		//     The source Vector.
		//
		//   matrix:
		//     The transformation Matrix.
		//
		//   result:
		//     [OutAttribute] The transformed vector.
		public static void Transform(ref Vector position, ref Matrix matrix, out Vector result);
		//
		// Summary:
		//     Transforms a Vector by a specified Quaternion rotation.
		//
		// Parameters:
		//   value:
		//     The Vector to rotate.
		//
		//   rotation:
		//     The Quaternion rotation to apply.
		//
		//   result:
		//     [OutAttribute] An existing Vector filled in with the results of the rotation.
		public static void Transform(ref Vector value, ref Quaternion rotation, out Vector result);
		//
		// Summary:
		//     Transforms a source array of Vectors by a specified Matrix and writes the
		//     results to an existing destination array.
		//
		// Parameters:
		//   sourceArray:
		//     The source array.
		//
		//   matrix:
		//     The transform Matrix to apply.
		//
		//   destinationArray:
		//     An existing destination array into which the transformed Vectors are written.
		public static void Transform(Vector[] sourceArray, ref Matrix matrix, Vector[] destinationArray);
		//
		// Summary:
		//     Transforms a source array of Vectors by a specified Quaternion rotation
		//     and writes the results to an existing destination array.
		//
		// Parameters:
		//   sourceArray:
		//     The source array.
		//
		//   rotation:
		//     The Quaternion rotation to apply.
		//
		//   destinationArray:
		//     An existing destination array into which the transformed Vectors are written.
		public static void Transform(Vector[] sourceArray, ref Quaternion rotation, Vector[] destinationArray);
		//
		// Summary:
		//     Applies a specified transform Matrix to a specified range of an array of
		//     Vectors and writes the results into a specified range of a destination array.
		//
		// Parameters:
		//   sourceArray:
		//     The source array.
		//
		//   sourceIndex:
		//     The index in the source array at which to start.
		//
		//   matrix:
		//     The transform Matrix to apply.
		//
		//   destinationArray:
		//     The existing destination array.
		//
		//   destinationIndex:
		//     The index in the destination array at which to start.
		//
		//   length:
		//     The number of Vectors to transform.
		[SuppressMessage("Microsoft.Usage", "CA2233")]
		public static void Transform(Vector[] sourceArray, int sourceIndex, ref Matrix matrix, Vector[] destinationArray, int destinationIndex, int length);
		//
		// Summary:
		//     Applies a specified Quaternion rotation to a specified range of an array
		//     of Vectors and writes the results into a specified range of a destination
		//     array.
		//
		// Parameters:
		//   sourceArray:
		//     The source array.
		//
		//   sourceIndex:
		//     The index in the source array at which to start.
		//
		//   rotation:
		//     The Quaternion rotation to apply.
		//
		//   destinationArray:
		//     The existing destination array.
		//
		//   destinationIndex:
		//     The index in the destination array at which to start.
		//
		//   length:
		//     The number of Vectors to transform.
		[SuppressMessage("Microsoft.Usage", "CA2233")]
		public static void Transform(Vector[] sourceArray, int sourceIndex, ref Quaternion rotation, Vector[] destinationArray, int destinationIndex, int length);
		//
		// Summary:
		//     Transforms a 3D vector normal by a matrix.
		//
		// Parameters:
		//   normal:
		//     The source vector.
		//
		//   matrix:
		//     The transformation matrix.
		public static Vector TransformNormal(Vector normal, Matrix matrix);
		//
		// Summary:
		//     Transforms a vector normal by a matrix.
		//
		// Parameters:
		//   normal:
		//     The source vector.
		//
		//   matrix:
		//     The transformation Matrix.
		//
		//   result:
		//     [OutAttribute] The Vector resulting from the transformation.
		public static void TransformNormal(ref Vector normal, ref Matrix matrix, out Vector result);
		//
		// Summary:
		//     Transforms an array of 3D vector normals by a specified Matrix.
		//
		// Parameters:
		//   sourceArray:
		//     The array of Vector normals to transform.
		//
		//   matrix:
		//     The transform matrix to apply.
		//
		//   destinationArray:
		//     An existing Vector array into which the results of the transforms are written.
		public static void TransformNormal(Vector[] sourceArray, ref Matrix matrix, Vector[] destinationArray);
		//
		// Summary:
		//     Transforms a specified range in an array of 3D vector normals by a specified
		//     Matrix and writes the results to a specified range in a destination array.
		//
		// Parameters:
		//   sourceArray:
		//     The source array of Vector normals.
		//
		//   sourceIndex:
		//     The starting index in the source array.
		//
		//   matrix:
		//     The transform Matrix to apply.
		//
		//   destinationArray:
		//     The destination Vector array.
		//
		//   destinationIndex:
		//     The starting index in the destination array.
		//
		//   length:
		//     The number of vectors to transform.
		[SuppressMessage("Microsoft.Usage", "CA2233")]
		public static void TransformNormal(Vector[] sourceArray, int sourceIndex, ref Matrix matrix, Vector[] destinationArray, int destinationIndex, int length);
	}*/
}
